gpio: mvebu: only fail on missing clk if pwm is actually to be used
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 17 Dec 2018 08:30:10 +0000 (09:30 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Sun, 30 Dec 2018 09:04:03 +0000 (09:04 +0000)
commit5c76576fed8bce2c5a8cb4f9799966a870073323
tree0f82dab578503b27a38ee2e6db7967aa3c06f66e
parent5db40f8690f9e4a752cff49b4e4b1b3df6fdae24
gpio: mvebu: only fail on missing clk if pwm is actually to be used

The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm
registers. So there is no need for a clk as the pwm isn't used anyhow.
So only check for the clk in the presence of the pwm registers. This fixes
a failure to probe the gpio driver for the above mentioned gpio device.

Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Gbp-Pq: Topic bugfix/arm
Gbp-Pq: Name gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch
drivers/gpio/gpio-mvebu.c